﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.Product;

namespace ZBJF.Warranty.IBLL
{
    public partial interface IProductModelsService
    {
        ProductModels LoadByID(long id);
        ProductModels LoadByModelCode(string modelCode);
        ProductModels LoadByName(long brandId, string modelName);
        bool IsExist(long brandId, string modelName, long id = 0);
        /// <summary>
        /// 获得所有配件类型的型号
        /// </summary>
        /// <param name="brandId">获得该品牌下所有的配件类型的型号</param>
        /// <returns></returns>
        IQueryable<ProductModels> GetProductModel(long brandId = -1);
        IQueryable<ProductModels> GetProductModel(ProductModelsModel model);
        IQueryable<ProductModels> GetPagingList(ProductModelsModel model, out int total);

        /// <summary>
        /// 获取设备信息
        /// </summary>
        /// <param name="modelId">型号ID</param>
        /// <returns></returns>
        EquipmentInfo GetEquipmentInfo(long modelId);

        /// <summary>
        /// 获取型号名称
        /// </summary>
        /// <param name="productModelId">型号ID</param>
        /// <returns></returns>
        string GetModelName(long productModelId);
    }
}
